package org.arch_learn.ioc_aop.aop.auto_config;

import org.arch_learn.flashboot.ConnectionManager;
import org.arch_learn.flashboot.autoconfigure.Bean;
import org.arch_learn.flashboot.autoconfigure.ConditionalOnBean;
import org.arch_learn.flashboot.autoconfigure.Configuration;
import org.arch_learn.ioc_aop.aop.TransactionManager;

@Configuration
@ConditionalOnBean(ConnectionManager.class)
public class TransactionManagerAutoConfiguration {

    @Bean
    public TransactionManager transactionManager(ConnectionManager connectionManager) {
        return new TransactionManager(connectionManager);
    }
}
